home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
msqc25t1
/
cmdlnarg.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-03
|
631b
|
23 lines
/* cmdlnarg.c By Tom Harrold Tue. Dec. 6, 1988
*/
/* This program will print out the command line arguments to test
out and show how the argv and agrc function works.
*/
#include <stdio.h>
main(argc, argv)
int argc; /* number of command line arguments */
char *argv[]; /* actual command line arguments */
{
int index; /* index into the arry */
/* containing command line */
/* print each command on one line */
for (index = 0; index < argc; ++index)
printf("%d %s ", index, argv[index]);
printf(" arg = %d ", argc);
putchar('\n'); /* newline */
}